home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / demos / misc / walls17.lha / walls17.txt < prev   
Encoding:
Text File  |  1995-02-16  |  11.6 KB  |  253 lines

  1.  jgggggg     gggggg       ggggg              jgggg    gggg,     D.H.1994
  2.   "####"     "0###F       "##@"               "###    "###F
  3.    9###_       ###k       j##                  ###     ###F
  4.     ###&      _####_      0#"                  ###     ###F
  5.     3###p     d####k     j#@                   ###     ###F
  6.      0###    j##9###_    ##    _ggggggg_       ###     ###F     _gggggg_
  7.       ###_   ##  ####   J#F    ###" "N##k      ###     ###F    g#F" 7###
  8.       0###  J#F  ?###L  ##     "^"    ###      ###     ###F    ##h__ ""
  9.        ###L ##    0###_d#F     __ggM#N###      ###     ###F    9#####g__
  10.        9###0#F    `###N##     g##@"   ###      ###     ###F      "@NN###_
  11.         ####@      0###N     j###     ###      ###     ###F   _gg_   "###
  12.         ]###        N##F      ###L___dN##L_   j###_    ###L   0##&___g#N'
  13.          #NF        7N#        9NNNNP" @N#@  ]NNNNNF  NNNNN#   "N#NN#@P
  14.  
  15.                   Walls V1.7
  16.  
  17.  
  18. Raycasting.  Oh yes, it seemed kinda cool at the time.  Walls is not a
  19. new routine.  The raycasting-code in Walls was written around newyear
  20. 92-93 and was optimized for a demorelease later, in march 94.  The
  21. algorithm isn't that fast (even if I thought so at the time :-) simply
  22. because raycasting isn't a very fast technique.  The maps are pretty
  23. limited, and the routine can't handle anything but perpendicular
  24. walls.  But it does have other advantages.
  25.  
  26. For anybody who wonders (and I've been asked this many, many times)
  27. Walls was programmed in 100% assembler (Trash'mOne 1.7).  So there.
  28.  
  29. The demo should be runnable on just about any Amiga.  I've tested it
  30. on my own computers (A500 + A1200) but I can't guarantee anything
  31. about any other setups.  The program contains occational bugs and will
  32. crash every once in a while (hopefully not too often though).  If you
  33. can't live with that, don't run it.
  34.  
  35. What is it then?  It's basically the same routine as found in the
  36. files "1frame.exe" and "2planes.exe" in the original Walls-package,
  37. only with a little more colors, a background-horizon, objects and
  38. ...hmmm...  "floors" I guess.  If you want to know more, read the part
  39. about the code later. Or run the demo.
  40.  
  41.  
  42.  
  43.  
  44. The Editor (also read the warnings later!)
  45.  
  46. Whoa!  Yes, it's true!  Walls now allows you to create your own
  47. worlds!  Actually, the whole editor-thing was hacked together in two
  48. nights recently, just because after 6 months of inactivity I realised
  49. that since I will never continue to improve the routine anyway I might
  50. just as well make it publicly available.
  51.  
  52. Just use the mouse to paint walls of your choice ; draw with the left
  53. button and delete with the right.  Both mousebuttons will exit each part.
  54.  
  55. After you have painted the map, you can place some objects into it.
  56. I've had the object-handling routines ready for almost a year now, so
  57. I thought I might include a small editor for these as well.  The
  58. objects you can add are only bouncing balls, but theoretically the
  59. routine can handle any number of different objects (sizes, colors
  60. etc.) just as long as there is free chipmem (the bob is prescaled/
  61. colored in the beginning of the routine and thus takes up a lot of
  62. chipmem).  I decided to keep the memory-requirements low so that even
  63. A500-users will be able to run the demo.  After all, this isn't
  64. exactly state-of-the-art code anymore anyway, and many of the people
  65. who liked V1.0 were A500 owners who were happy to get hold of
  66. something new that worked on their machines... The original idea was
  67. to make the engine render all objects as vectorobjects (I _hate_
  68. bitmaps ala' Doom.  If it's 3d then it's 3d - IMHO bitmaps destroy the
  69. sense of 3-space) but I never got down to actually completing the
  70. vectorengine.
  71.  
  72. And finally you can add shadows to the floor.  This was one of the
  73. first ideas I got about floors, since texturemapping the whole floor
  74. was far too CPU-intense for an A500 (which was the machine I started
  75. coding Walls on).  The shadows are simple two-dimensional blitter
  76. outlined polygons, but they look kinda good anyway if you ask me.  You
  77. can select from 8 different objects by cycling them with the right
  78. mousebutton.
  79.  
  80. A maximum of 256 balls and 256 shadows can be inserted into the maze
  81. (this is just the reserved amount of space, theoretically there are no
  82. boundaries), after that the routine will most likely crash. :-)
  83.  
  84. The shadowobjects to choose from are:
  85.  
  86. 1 - Right Arrow
  87. 2 - Down Arrow
  88. 3 - Left Arrow
  89. 4 - Up Arrow
  90. 5 - Square
  91. 6 - Triangle
  92. 7 - Cross
  93. 8 - Circle (ballshadow)
  94.  
  95. Pretty sophisticated, huh? (yeah yeah, I'm no artist :-)
  96. You can combine many shadows on one square if you wish.
  97.  
  98.  
  99.  
  100. Limitations and warnings
  101.  
  102. The routine isn't very thoroughly debugged.  It will probably crash
  103. every once in a while, but that's life.  It's pretty stable on my
  104. machine though (A1200+FAST), and it should work fine on A500s too
  105. (though slightly slower).
  106.  
  107. Every wallsegment will have to include at least one corner!  That is,
  108. no walls can be standalone ; you will always have to make at least one
  109. turn in each segment.  This is due to the way my cheat works, not much
  110. to do about it.  Making such walls will not crash the machine, but the
  111. wallsegment will become invisible if looked upon from the "wrong" angle.
  112.  
  113. IE Don't make walls like this   xxxxxxxx  or this  x
  114.                            x
  115. But make them like this   xxxxxxx    x           x
  116.                 x    x           x
  117.                 x    x
  118.                      xxxxx
  119.  
  120. IMPORTANT : *DO NOT* leave infinityholes in the map!!! The whole map
  121. must always have a fixed boundary - if a piece of the outermost border
  122. is missing the raycaster will start looping in memory and your
  123. computer will probably crash.
  124.  
  125. Balls and shadows can only be placed in the center of each square.
  126. (multiples on one square if you wish).  This is not a limitation in
  127. the routine (it was programmed to be modular, and can even handle
  128. large shadows covering several squares) but it was the easiest way to
  129. implement objects in the editor.  Besides, the sorting-algorithm have
  130. problems with balls placed very close to a wall anyway.
  131.  
  132. You can't save your maps.  Tough luck.  I did't have any source for
  133. diskhandling lying around (and some peeking in amiga.demos gave no
  134. result) so I let it be (this release _is_ just a quick hack).  If you
  135. have some finished source for save/load, mail it to me then I might
  136. release a V1.71 with save/load map options.
  137.  
  138. If anybody wonders why the floorshadows get deformed when they get
  139. real close, it's because I don't z-cut them - I simply handle all
  140. negative coordinates as zeros. The original shadow routine was
  141. written about 8 months ago (my intention was to add z-cutting
  142. later) but I just can't push myself into manipulating the routine
  143. anymore... Everything is buffered into a million different places
  144. (modularity, you know :-) and I don't have the time to trace down
  145. the routine again. I really should start documenting my source...
  146.  
  147.  
  148.  
  149. The code
  150.  
  151. ..is probably pretty ugly.  I do not take over the display or do any
  152. of all that stuff-you-always-should-do.  I haven't coded actively
  153. since I bought my A1200, and back in those days nobody cared about
  154. systemfriendliness as long as the routines worked on a warmbooted 
  155. A500 :-).  Actually, I don't even kill interrupts, so if you want to
  156. you can have Delitracker playing your favourite module in the
  157. background while you run around in the maze.  Who says you can't use
  158. softwaremixing in a game?  (try playing your favourite s3m in the
  159. background and be amazed!)
  160.  
  161. The code is old and ugly.  If there ever is a Walls V2.0 I'll recode
  162. the whole shit from scratch, but I hardly think I'll ever bother.
  163. Dammit - I'm getting old too!  I just don't have the patience to sit
  164. around coding all day any more.  I now know of a new algorithm that is
  165. even faster than the one I use at the moment (not BSP, not z-buffered
  166. vectors), and that would also allow nonorthogonal walls and doors.  I
  167. also have a pretty neat idea about how different level floors could be
  168. included...
  169.  
  170. Most of the CPU time is currently spent waiting for the blitter
  171. (probably >50%).  This is because I coded the original routine on
  172. an A500 without fastmem and didn't think about splicing the code in
  173. a smarter way.  Lots of speed could theoretically be gained here.
  174.  
  175. On AGA-computers bitplane-modulos and sprites could be used to speed
  176. up much of the stuff that is now being blitted, and also increase the
  177. speed of the routine a lot.  Some of you might not see the point in
  178. doing this - "why do crappy planar-walls without texturemapping when
  179. tmapping obviously _can_ be done?".
  180. Answer: Speed. 
  181. A new routine based on the AGA chipset + FASTmem and better algorithms
  182. could be KICK ASS! Just imagine what you see in this routine, but with
  183. non-orthagonal walls and windows, differently colored wall-segments,
  184. moving lightsources and dozens of vector-objects flying around in 20fps.
  185. It could be done, possibly even with different height floors. But you
  186. would have to forget about TMapping.
  187.  
  188.  
  189.  
  190. On wolfie-clones
  191.  
  192.  My personal opinion is that many Amiga-coders are just too
  193. PC-fixated. Sure - PCs can handle very complex texturemapping without
  194. sweat (hell, when you look at PC-demos you'd think that's all you can
  195. do with them!) but that's just not the Amiga's strong side. That's not
  196. saying I don't like all the wolf-clones that has appeared on the Amiga
  197. during the last year(s) - hell no! I love them! It's always nice to
  198. see how far the Amiga can be pushed. But I'm somewhat surprised at the
  199. incredible lack of originality many coders seem to suffer from. Yeah,
  200. Doom was real nice, but what's the point in doing the same thing again
  201. and again if you never have anything of your own to add?
  202.  
  203. Walls is getting old. This routine is very far from state of the art
  204. today (just looking at the stuff Bomb, John Hendrix and Parallax (to
  205. pick but a few) have done), but I still somehow like its simplicity.
  206. You could do some tremendeous stuff on the Amiga if you just
  207. concentrated on the things the Amy can do well instead of trying to
  208. imitate the PC.
  209.  
  210.  
  211.  
  212. The soap opera
  213.  
  214. After the release of Walls V1.0 I got a lot of response from people
  215. who liked it (hi everybody!) and among the emails there was one
  216. particularly interesting ; a proposal for a deal from a software
  217. company in Canada.  The deal was almost too good to be true (it was),
  218. and what they said was basically that they wanted me to continue
  219. working on the routine together with one of their programmers and make
  220. a game out of it.  Cool.
  221.  
  222. So, I continued with improving the routine at the same time as I
  223. started negotiating a deal with the company. We got everything sorted
  224. out, money, royalties, a schedule... But all of a sudden they stopped
  225. replying to my mails. At this point the routine was about where it is
  226. right now (I worked on it during weekends and evenings for about two
  227. months) and considering the amount of work I had already put into it I
  228. got kinda pissed. Wouldn't you?
  229.  
  230. Realizing what was about to happen I put the whole project on ice and
  231. started bugging my contact with mails so that I at least would get to
  232. know what was going on.  I had been promised a fair amount of money
  233. and some hard/software that should have been posted ages ago by then,
  234. but naturally, I never received any of it.  After a couple of months
  235. of fruitless waiting I finally got a reply where my contact explained
  236. that the company was in financial trouble and all projects had been
  237. cancelled.  Hell - for all I know the company never even existed.  A
  238. pity really.  I had _soo_ many good ideas for the game, and the guy I
  239. corresponded with seemed like a real nice fella.  I still think it was
  240. a shitty thing of them to do - they could have at least kept me
  241. informed!  Hmmm...  That's just life I guess.  By then I was already
  242. so tired of everything that had to do with the game that I decided to
  243. forget all about it, and I did.  This is it.
  244.  
  245. Oh well. Enough crap for now. Run the program now if you haven't
  246. already - I hope you'll all have fun with it!
  247.  
  248.  
  249. .. Mats
  250.    mknip@hut.fi
  251.    http://www.hut.fi/~mknip
  252.  
  253.